<template>
  <div>
    <subjectList :list="list"></subjectList>
    <tabbar now-page="2"> </tabbar>
    <topic :value="dataList"></topic>
  </div>
</template>

<script>
import subjectList from "@/components/item-subjectList";
import tabbar from "@/components/tabbar";
import topic from "@/components/item-topic";
// api
import { getProjectList } from "@/api/miva";

export default {
  components: {
    subjectList,
    tabbar,
    topic
  },
  data() {
    return {
      show: false,
      list: [],
      dataList: []
    };
  },
  async mounted() {
    await this.getProjectList();
  },
  methods: {
    async getProjectList() {
      const res = await getProjectList({ type: 5 });
      this.list = res.data;
      console.log(this.list);
    },
    changeHandler(data) {
      this.dataList = data;
    }
  }
};
</script>